package com.learn.algorithm.designpattern.chain;

/**
 * 责任链模式
 * @author wangxing
 * @version 2020/7/22 13:46 Administrator
 */
public class LearnChain {
    public static void main(String[] args) {
        RequestTemp r1 = new RequestTemp("wangxing", "waaa","1000");
        RequestTemp r2 = new RequestTemp("wangxing", "1234rewq","1000");
        RequestTemp r3 = new RequestTemp("wangxing", "1234rewq","100");
        BaseChain chain = new LoginChain(new RuleChain(null));
        chain.process(r1);
        System.out.println("-------------------------------");
        chain.process(r2);
        System.out.println("-------------------------------");
        chain.process(r3);
    }
}
